# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=emacs-async-await
pkgver=1.1_git20220826
_gitrev=5d5b6ea07c09e3ec42f95b13fc837608658324e1
pkgrel=0
_pkgreal=async-await
pkgdesc="Simple implementation of Async/Await"
url="https://github.com/chuntaro/emacs-async-await"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	cmd:emacs
	emacs-iter2
	emacs-promise
	"
makedepends="emacs-nox"
source="https://github.com/chuntaro/emacs-async-await/archive/$_gitrev/emacs-async-await-$_gitrev.tar.gz"
builddir="$srcdir/$pkgname-$_gitrev"
options="!check" # no tests provided

build() {
	emacs -batch -q -no-site-file -L . \
		-eval '(setq byte-compile-error-on-warn t)' \
		-f batch-byte-compile \
		./*.el
}

package() {
	install -Dvm644 ./*.el ./*.elc \
		-t "$pkgdir"/usr/share/emacs/site-lisp/

	cd "$pkgdir"/usr/share/emacs/site-lisp
	emacs -batch -q -no-site-file \
		-eval "(loaddefs-generate \".\" \"$_pkgreal-loaddefs.el\")"
}

sha512sums="
0967347fed289fb71f2acc7b0118b77cc5e91b3d5acd6d7b9d604832420f88e70e68210bdee4d858aa0ca437b080a36a599939a979069b8d1a21f83cf2469236  emacs-async-await-5d5b6ea07c09e3ec42f95b13fc837608658324e1.tar.gz
"
